<!-- 用户协议 -->
<style scoped>
.headline {
  width: 100%;
  height: 50px;
  position: fixed;
  top: 0;
  right: 0;
  background-color: #ffffff;
  align-content: center;
  text-align: center;
  line-height: 50px;
}

.title {
  width: 100%;
  height: 30px;
  line-height: 30px;
  text-align: center;
  position: fixed;
  top: 50px;
  right: 0;
  background-color: #f8f8f8;
}

.content {
  height: 100%;
  margin-top: 80px;
  padding: 0 20px;
  background-color: #f8f8f8;
}

.button {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 50px;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.button_button {
  width: 90%;
  margin: 0 5%;
  height: 35px;
  text-align: center;
  background-color: #5ba0ea;
  color: white;
  border-radius: 15px;
  border: none;
}
</style>

<template>
  <div class="headline">用户协议</div>
  <div class="title">标题</div>
  <div class="content" v-html="data.content"></div>
  <div class="button">
    <button class="button_button" @click="GoBack">我已阅读</button>
  </div>
</template>

<script setup>
import { ref, computed, watch, reactive } from "vue";
import axios from "axios";
import { useRouter, useRoute } from "vue-router";
import { showToast } from "vant";
const router = useRouter();
const route = useRoute();
const data = ref("123");

axios({
  url: "https://wwz.jingyi.icu/app/Agreement/index",
  method: "post",
  data: {},
})
  .then((arr) => {
    console.log(arr);
    data.value = arr.data.data;
    console.log(data.value);
  })
  .catch((err) => {
    console.log(err);
  });

  // 返回登录
  function GoBack(){
    router.push({
    name: "login",
  });
  }
</script>